package com.deimos;

import com.deimos.dataBase.TaskController;

public class CheckStatus extends Thread {

    private static CheckStatus INSTANCE = new CheckStatus();
    public static boolean run = false;
    private CheckStatus() {
    }

    public static CheckStatus getInstance() {
	return INSTANCE;
    }

    public void run() {
	while (true) {
	    try {
		while (!run)
		run = true;
		TaskController taskController = new TaskController();
		taskController.validateAllStatus();
		run = false;
		Thread.sleep(2000);
	    } catch (InterruptedException e) {
		// TODO Auto-generated catch block
		run = false;
		e.printStackTrace();
	    }
	}
    }
}
